package com.ruoyi.car.service;

import com.github.pagehelper.PageInfo;
import com.ruoyi.car.controller.admin.CarCustomer.vo.CarCustomerReq;
import com.ruoyi.car.controller.admin.CarCustomer.vo.CarCustomerResp;
import com.ruoyi.car.entity.CarCustomer;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author 11452
* @description 针对表【car_customer(客户信息表)】的数据库操作Service
* @createDate 2023-06-06 11:24:14
*/
public interface CarCustomerService extends IService<CarCustomer> {

    /**
     * 多表分页查询
     * @param req
     * @return
     */
    PageInfo<CarCustomerResp> search(CarCustomerReq req);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    CarCustomerResp findById(Long id);

    /**
     * 检查手机号是否被占用
     * @param id
     * @param phone
     * @return
     */
    int checkPhoneUnique(Long id, String phone);
}
